<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>医院 - 在线挂号系统</title>

    <link rel="stylesheet" href="css/bootstrap.min.css">

    <link rel="stylesheet" href="css/list.css">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <script src="js/jq-paginator.js"></script>
    <style>
        :root {
            --primary: #1a73e8;
            --primary-dark: #0d5cb6;
            --secondary: #34a853;
            --light: #f8f9fa;
            --dark: #202124;
            --gray: #5f6368;
            --light-gray: #dadce0;
            --danger: #ea4335;
            --warning: #fbbc04;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Noto Sans SC', sans-serif;
            background-color: #f5f7fa;
            color: var(--dark);
            line-height: 1.6;
        }

        .container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* 头部样式 */
        header {
            background: linear-gradient(135deg, var(--primary), #0d5cb6);
            color: white;
            padding: 15px 0;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(255,255,255,0.2);
        }

        .logo {
            display: flex;
            align-items: center;
        }

        .logo i {
            font-size: 2rem;
            margin-right: 10px;
        }

        .logo h1 {
            font-size: 1.5rem;
            font-weight: 700;
        }

        .contact-info {
            display: flex;
            gap: 30px;
        }

        .contact-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .header-nav {
            padding-top: 15px;
        }

        .header-nav ul {
            display: flex;
            list-style: none;
            gap: 25px;
        }

        .header-nav a {
            color: white;
            text-decoration: none;
            font-weight: 500;
            font-size: 1.1rem;
            transition: all 0.3s ease;
            padding: 5px 10px;
            border-radius: 4px;
        }

        .header-nav a:hover, .header-nav a.active {
            background: rgba(255, 255, 255, 0.2);
        }

        /* 英雄区域 */
        .hero {
            background: linear-gradient(rgba(13, 92, 182, 0.8), rgba(13, 92, 182, 0.9)), url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1200&q=80');
            background-size: cover;
            background-position: center;
            color: white;
            padding: 80px 0;
            text-align: center;
        }

        .hero h2 {
            font-size: 2.5rem;
            margin-bottom: 20px;
            animation: fadeInDown 1s ease;
        }

        .hero p {
            font-size: 1.2rem;
            max-width: 700px;
            margin: 0 auto 30px;
            animation: fadeInUp 1s ease;
        }

        /* 预约卡片 */
        .appointment-card {
            background: white;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            padding: 30px;
            max-width: 800px;
            margin: -80px auto 40px;
            position: relative;
            z-index: 10;
            animation: slideUp 0.8s ease;
        }

        .card-title {
            text-align: center;
            margin-bottom: 25px;
            color: var(--primary);
            font-size: 1.5rem;
            font-weight: 600;
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 20px;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--dark);
        }

        .form-group select,
        .form-group input {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid var(--light-gray);
            border-radius: 6px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .form-group select:focus,
        .form-group input:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
        }

        .btn {
            display: inline-block;
            background: var(--primary);
            color: white;
            padding: 14px 28px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 500;
            transition: all 0.3s ease;
            text-decoration: none;
            text-align: center;
        }

        .btn:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .btn-block {
            display: block;
            width: 100%;
        }

        /* 特色服务 */
        .features {
            padding: 80px 0;
            background: white;
        }

        .section-title {
            text-align: center;
            margin-bottom: 50px;
            position: relative;
        }

        .section-title h2 {
            font-size: 2rem;
            color: var(--primary);
            margin-bottom: 15px;
        }

        .section-title p {
            color: var(--gray);
            max-width: 700px;
            margin: 0 auto;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 30px;
        }

        .feature-card {
            background: var(--light);
            border-radius: 10px;
            padding: 30px;
            text-align: center;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
        }

        .feature-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        }

        .feature-icon {
            width: 70px;
            height: 70px;
            background: rgba(26, 115, 232, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
            color: var(--primary);
            font-size: 1.8rem;
        }

        .feature-card h3 {
            margin-bottom: 15px;
            color: var(--dark);
        }

        /* 科室展示 */
        .departments {
            padding: 80px 0;
            background: #f5f7fa;
        }

        .departments-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 25px;
        }

        .department-card {
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
        }

        .department-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }

        .department-img {
            height: 180px;
            background-size: cover;
            background-position: center;
        }

        .department-content {
            padding: 20px;
        }

        .department-content h3 {
            margin-bottom: 10px;
            color: var(--primary);
        }

        .doctor-list {
            list-style: none;
            margin-top: 15px;
        }

        .doctor-list li {
            padding: 8px 0;
            border-bottom: 1px solid var(--light-gray);
            display: flex;
            justify-content: space-between;
        }

        .doctor-list li:last-child {
            border-bottom: none;
        }

        .doctor-name {
            font-weight: 500;
        }

        .doctor-title {
            color: var(--gray);
            font-size: 0.9rem;
        }

        /* 底部 */
        footer {
            background: var(--dark);
            color: white;
            padding: 60px 0 20px;
        }

        .footer-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 40px;
            margin-bottom: 40px;
        }

        .footer-col h3 {
            margin-bottom: 20px;
            font-size: 1.2rem;
            position: relative;
            padding-bottom: 10px;
        }

        .footer-col h3::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 40px;
            height: 2px;
            background: var(--primary);
        }

        .footer-links {
            list-style: none;
        }

        .footer-links li {
            margin-bottom: 10px;
        }

        .footer-links a {
            color: #e8eaed;
            text-decoration: none;
            transition: all 0.3s ease;
        }

        .footer-links a:hover {
            color: var(--primary);
            padding-left: 5px;
        }

        .copyright {
            text-align: center;
            padding-top: 20px;
            border-top: 1px solid rgba(255,255,255,0.1);
            color: #9aa0a6;
            font-size: 0.9rem;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .header-top {
                flex-direction: column;
                gap: 15px;
            }

            .contact-info {
                gap: 15px;
            }

            .header-nav ul {
                flex-wrap: wrap;
                justify-content: center;
            }

            .hero {
                padding: 50px 0;
            }

            .hero h2 {
                font-size: 2rem;
            }

            .appointment-card {
                margin-top: -40px;
            }
        }

        @media (max-width: 480px) {
            .contact-info {
                flex-direction: column;
                gap: 10px;
            }

            .hero h2 {
                font-size: 1.8rem;
            }

            .section-title h2 {
                font-size: 1.6rem;
            }
        }

        /* 动画 */
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(50px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        /* 导航栏样式 */
        .nav {
            width: 100%;
            display: flex;
            align-items: center;
            padding: 15px 50px;
            background: white;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
            position: relative;
            z-index: 10;
        }

        .nav-logo {
            height: 50px;
            width: 50px;
            border-radius: 50%;
            background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            font-weight: bold;
            margin-right: 15px;
            box-shadow: 0 3px 10px rgba(13, 110, 253, 0.3);
        }

        .nav-title {
            color: #0d6efd;
            font-size: 1.5rem;
            font-weight: 700;
            letter-spacing: 0.5px;
        }

        .nav-links {
            display: flex;
            align-items: center;
            margin-left: auto;
            gap: 15px;
        }

        .nav-link-custom {
            display: flex;
            align-items: center;
            padding: 8px 16px;
            color: #555;
            text-decoration: none;
            font-weight: 500;
            border-radius: 6px;
            transition: all 0.3s ease;
        }

        .nav-link-custom i {
            margin-right: 6px;
            font-size: 1rem;
            transition: transform 0.3s ease;
        }

        .nav-link-custom:hover {
            background: rgba(13, 110, 253, 0.08);
            color: #0d6efd;
        }

        .nav-link-custom:hover i {
            transform: scale(1.1);
        }

        .user-dropdown {
            position: relative;
            margin-left: 10px;
        }

        .user-info {
            display: flex;
            align-items: center;
            padding: 8px 16px;
            color: #555;
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.3s ease;
        }

        .user-info:hover {
            background: rgba(13, 110, 253, 0.08);
            color: #0d6efd;
        }

        .user-info i {
            margin-right: 8px;
            font-size: 1.2rem;
        }

        .user-dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            width: 200px;
            background: white;
            border-radius: 8px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
            padding: 10px 0;
            margin-top: 5px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(10px);
            transition: all 0.3s ease;
            z-index: 1000;
        }

        .user-dropdown:hover .user-dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .user-dropdown-menu::before {
            content: '';
            position: absolute;
            top: -8px;
            right: 20px;
            width: 16px;
            height: 16px;
            background: white;
            transform: rotate(45deg);
        }

        .user-dropdown-item {
            display: flex;
            align-items: center;
            padding: 10px 20px;
            color: #333;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.2s ease;
        }

        .user-dropdown-item i {
            margin-right: 10px;
            color: #0d6efd;
            font-size: 1rem;
        }

        .user-dropdown-item:hover {
            background: #f0f7ff;
            color: #0d6efd;
        }
    </style>
</head>
<body>
<!-- 导航栏 -->
<nav class="nav">
    <div class="nav-logo">
        <i class="bi bi-heart-pulse"></i>
    </div>
    <span class="nav-title">医院挂号系统</span>

    <div class="nav-links">
        <a class="nav-link-custom" href="#">
            <i class="bi bi-house-door"></i>主页
        </a>


        <div class="user-dropdown">
            <div class="user-info">
                <i class="bi bi-person-circle"></i>
                <span>当前用户</span>
            </div>

            <div class="user-dropdown-menu">
<!--                <a class="user-dropdown-item" href="#">-->
<!--                    <i class="bi bi-person-badge"></i>个人资料-->
<!--                </a>-->
                <a class="user-dropdown-item" onclick="wdgh()">
                    <i class="bi bi-calendar-check"></i>我的挂号
                </a>
                <a class="user-dropdown-item" onclick="tc()">
                    <i class="bi bi-box-arrow-right"></i>退出登录
                </a>
            </div>
        </div>
    </div>
</nav>

<!-- 英雄区域 -->
<section class="hero">
    <div class="container">
        <h2>便捷就医，健康同行</h2>
        <p>康健医院为您提供专业的医疗服务，在线预约挂号，免排队，省时省心</p>
    </div>
</section>

<!-- 预约卡片 -->
<div class="container">
    <div class="appointment-card">
        <div class="card-title">
            <h2>快速预约挂号</h2>
        </div>
        <form>
            <div class="form-grid">
                <div class="form-group">
                    <label for="department">选择科室</label>
                    <select id="department">
                        <option value="">请选择科室</option>
                        <option value="1">内科</option>
                        <option value="2">外科</option>
                        <option value="3">儿科</option>
                        <option value="4">妇产科</option>
                        <option value="5">眼科</option>
                        <option value="6">耳鼻喉科</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="doctor">选择医生</label>
                    <select id="doctor">
                        <option value="">请选择医生</option>
                        <option value="1">主任医师</option>
                        <option value="2">副主任医师</option>
                        <option value="3">主治医师</option>
                        <option value="4">住院医师</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="date">选择日期</label>
                    <input type="date" id="date">
                </div>
                <div class="form-group">
                    <label for="time">选择时段</label>
                    <select id="time">
                        <option value="">请选择时间段</option>
                        <option value="0">上午 (8:00-12:00)</option>
                        <option value="1">下午 (14:00-18:00)</option>
                    </select>
                </div>
            </div>
            <button type="submit" class="btn btn-block" onclick="yyy()">立即预约</button>
        </form>
    </div>
</div>

<!-- 特色服务 -->
<section class="features">
    <div class="container">
        <div class="section-title">
            <h2>我们的特色服务</h2>
            <p>为您提供全方位、高品质的医疗服务体验</p>
        </div>
        <div class="features-grid">
            <div class="feature-card">
                <div class="feature-icon">
                    <img src="pic/logo2.jpg" class="nav-logo" alt="医院系统Logo">
                </div>
                <h3>在线预约</h3>
                <p>随时随地预约挂号，免排队，节省您宝贵时间</p>
            </div>
            <div class="feature-card">
                <div class="feature-icon">
                    <img src="pic/logo2.jpg" class="nav-logo" alt="医院系统Logo">
                </div>
                <h3>报告查询</h3>
                <p>在线查看检验报告，无需往返医院</p>
            </div>
            <div class="feature-card">
                <div class="feature-icon">
                    <img src="pic/logo2.jpg" class="nav-logo" alt="医院系统Logo">
                </div>
                <h3>专家门诊</h3>
                <p>三甲医院专家坐诊，提供专业诊疗服务</p>
            </div>
            <div class="feature-card">
                <div class="feature-icon">
                    <img src="pic/logo2.jpg" class="nav-logo" alt="医院系统Logo">
                </div>
                <h3>在线咨询</h3>
                <p>足不出户，与医生在线沟通</p>
            </div>
        </div>
    </div>
</section>

<!-- 科室介绍 -->
<section class="departments">
    <div class="container">
        <div class="section-title">
            <h2>热门科室</h2>
            <p>专业医疗团队为您提供全面的诊疗服务</p>
        </div>
        <div class="departments-grid">
            <div class="department-card">
                <div class="department-img" style="background-image: url('https://images.unsplash.com/photo-1581595219318-0bfac7daa8d0?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80');"></div>
                <div class="department-content">
                    <h3>内科</h3>
                    <p>专业治疗心血管、呼吸系统、消化系统等内科疾病</p>
                    <ul class="doctor-list">
                        <li>
                            <span class="doctor-name">张明</span>
                            <span class="doctor-title">主任医师</span>
                        </li>
                        <li>
                            <span class="doctor-name">李华</span>
                            <span class="doctor-title">副主任医师</span>
                        </li>
                        <li>
                            <span class="doctor-name">王芳</span>
                            <span class="doctor-title">主治医师</span>
                        </li>
                    </ul>
                    <a href="#" class="btn" style="margin-top: 15px;">预约挂号</a>
                </div>
            </div>
            <div class="department-card">
                <div class="department-img" style="background-image: url('https://images.unsplash.com/photo-1584824486539-53bb4646bdbc?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80');"></div>
                <div class="department-content">
                    <h3>外科</h3>
                    <p>开展各类普外科、骨科、泌尿外科手术</p>
                    <ul class="doctor-list">
                        <li>
                            <span class="doctor-name">赵强</span>
                            <span class="doctor-title">主任医师</span>
                        </li>
                        <li>
                            <span class="doctor-name">钱伟</span>
                            <span class="doctor-title">副主任医师</span>
                        </li>
                        <li>
                            <span class="doctor-name">孙静</span>
                            <span class="doctor-title">主治医师</span>
                        </li>
                    </ul>
                    <a href="#" class="btn" style="margin-top: 15px;">预约挂号</a>
                </div>
            </div>
            <div class="department-card">
                <div class="department-img" style="background-image: url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80');"></div>
                <div class="department-content">
                    <h3>妇产科</h3>
                    <p>提供孕产保健、妇科疾病诊疗等专业服务</p>
                    <ul class="doctor-list">
                        <li>
                            <span class="doctor-name">周敏</span>
                            <span class="doctor-title">主任医师</span>
                        </li>
                        <li>
                            <span class="doctor-name">吴燕</span>
                            <span class="doctor-title">副主任医师</span>
                        </li>
                        <li>
                            <span class="doctor-name">郑琳</span>
                            <span class="doctor-title">主治医师</span>
                        </li>
                    </ul>
                    <a href="#" class="btn" style="margin-top: 15px;">预约挂号</a>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- 底部区域 -->
<footer>
    <div class="container">
        <div class="footer-grid">
            <div class="footer-col">
                <h3>关于我们</h3>
                <p>康健医院是一所集医疗、教学、科研、预防、保健、康复为一体的现代化三级甲等综合性医院。</p>
            </div>
            <div class="footer-col">
                <h3>联系我们</h3>
                <ul class="footer-links">
                    <li><i class="fas fa-map-marker-alt"></i> 地址：北京市海淀区健康路88号</li>
                    <li><i class="fas fa-phone-alt"></i> 电话：010-12345678</li>
                    <li><i class="fas fa-envelope"></i> 邮箱：info@kangjianhospital.com</li>
                    <li><i class="fas fa-clock"></i> 工作时间：周一至周日 8:00-20:00</li>
                </ul>
            </div>
            <div class="footer-col">
                <h3>关注我们</h3>
                <p>关注公众号，获取最新医疗资讯和健康知识</p>

            </div>
        </div>
    </div>
</footer>

<script>


    function yyy(){
        // 阻止表单默认提交行为
        event.preventDefault();
        $("#statusFilter").val()
        // 获取表单数据
        const department =$("#department").val()
        console.log(department)
        const doctor = $("#doctor").val()
        const date = $("#date").val()
        console.log(date)
        const time =$("#time").val()
        console.log(time)

        // 验证表单数据
        if (!department || !doctor || !date || !time) {
            alert('请填写完整的预约信息！');
            return;
        }


        $.ajax({
            type:"post",
            url:"/relation/insertData"+location.search,
            data:{
                departmentId:department,
                level:doctor,
                appointmentDate:date,
                appointmentTime:time,
            },
            success:function (result){
                if(result==="添加成功"){
                    alert('预约提交成功！稍后我们将发送确认短信到您的手机。');
                }else {
                    alert("预约失败，请重新尝试")
                }

            }
        })
    }

    function wdgh(){
        location.href = "list.html"+location.search;
    }

    function tc(){
        location.href = "gh_login.html";
    }

    // 设置默认日期为明天
    document.addEventListener('DOMContentLoaded', function() {
        const today = new Date();
        const tomorrow = new Date(today);
        tomorrow.setDate(tomorrow.getDate() + 1);

        const formattedDate = tomorrow.toISOString().split('T')[0];
        document.getElementById('date').value = formattedDate;
    });
</script>
</body>
</html>